package net.csdn.business.notify.api.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import net.csdn.business.notify.common.model.query.NotifyRemindRecordQuery;
import net.csdn.business.notify.common.model.vo.NotifyRemindRecordVO;
import net.csdn.business.notify.api.service.INotifyRemindRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 通知中心-用户系统通知Controller
 * 
 * @author zhangyl
 * @date 2023-11-27
 */
@RestController
@RequestMapping("/api/v1/notify/remind")
public class NotifyRemindRecordController
{
    @Autowired
    private INotifyRemindRecordService notifyRemindRecordService;

    /**
     * 分页查询通知中心-用户通知记录列表
     */
    @PostMapping("/list")
    public Page<NotifyRemindRecordVO> findPageList(@RequestBody NotifyRemindRecordQuery query)
    {
        return notifyRemindRecordService.findPageList(query);
    }



    /**
     * 根据id获取通知中心-用户通知记录详细信息
     */
    @GetMapping(value = "/{id}")
    public NotifyRemindRecordVO getInfo(@PathVariable("id") String id)
    {
        return notifyRemindRecordService.selectNotifyRemindRecordById(id);
    }


    /**
     * 删除通知中心-用户通知记录
     */
	@DeleteMapping("/{id}")
    public Integer remove(@PathVariable("id")  String id)
    {
        return notifyRemindRecordService.deleteNotifyRemindRecordById(id);
    }
}
